<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>试题列表</title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    {load href="/static/css/bootstrap.min.css" /}
    {load href="/static/css/mycss.css" /}
    {load href="/static/css/dfjs_public.css" /}

    {load href="/static/js/jquery.js" /}
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    {load href="/static/js/bootstrap.min.js" /}
    {load href="/static/js/jquery.dataTables.min.js" /}
    <script>
        function show_right(){
            if($('.frame_left').hasClass('col-xs-10')){
                $('.frame_left').removeClass('col-xs-10');
                $('.frame_left').addClass('col-xs-12');
                $('.frame_right').hide();
            }else{
                $('.frame_left').removeClass('col-xs-12');
                $('.frame_left').addClass('col-xs-10');
                $('.frame_right').show();
            }

            $('#search_top').toggle();
        }

        $(function(){
            $('#nav_top li').click(function(){
                $(this).siblings().removeClass('active');
                $(this).addClass('active');
            });
        })

        $(function(){
            $('.search_list dt').click(function(){
                $(this).next().toggle();
                $(this).children('span').toggleClass('sjb');
            });
        })
    </script>


</head>
<body>
<div class="container-fluid hh ww" >
    <div class="frame_left col-xs-10">
        <div class="row head">
            <div class="col-xs-12 ph10 hh">
                <h3 class="fl mh0"><a href="{:url('admin/Index/index')}">考试系统</a></h3>
                <ul class="nav nav-pills ml40 fl" role="tablist" id="nav_top">
                    <li role="presentation" class="active"><a href="{:url('admin/Question/qlist')}">试题库</a></li>
                    <li role="presentation"><a href="{:url('admin/Paper/getList')}">试卷库</a></li>
                    <li role="presentation"><a href="{:url('admin/Examresult/getList')}">答卷列表</a></li>
                </ul>
                <div class="fr">
                    <div class="btn-group fl">
                        <a class="btn btn-success">新增试题</a>
                        <button class="btn btn-success dropdown-toggle"  data-toggle="dropdown" >
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="{:url('admin/Single/add')}">新建选择题</a></li>
                            <li><a href="{:url('admin/Fillblank/add')}">新建填空题</a></li>
                            <li><a href="{:url('admin/Judge/add')}">新建判断题</a></li>
                            <li><a href="{:url('admin/Shortanswer/add')}">新建简答题</a></li>
                        </ul>
                    </div>

                    <div id="search_top" style="width:300px;display:none;" class="fl ml20">
                        <div class="input-group">
                            <input type="text" class="form-control">
                            <span class="input-group-btn">
                                <button class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
                            </span>
                        </div>
                    </div>

                    <button class="btn btn-default ml20" onclick="show_right();">
                        <span class="glyphicon glyphicon-step-forward"></span>
                    </button>


                </div>
            </div>
        </div>
        <div class="row" >
            <div class="col-xs-12 pt20">
                <table class="table table-striped bb table-sort">
                    <thead>
                    <tr>
                        <th><input type="checkbox"></th>
                        <th>题干</th>
                        <th>题型</th>
                        <th>最后更新日期</th>
                        <th style="width:200px;">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="clist" item="list" key="k"}
                    <tr>
                        <td><input type="checkbox"></td>
                        <td>{$list.title}</td>
                        <td>{$list.category}</td>
                        <td>{$list.update_time}</td>
                        <td>
                            <a href="{:url('admin/Single/preview',['id'=>$list.id])}" class="btn btn-default" target="_blank">预览</a>
                            <a href="{:url('admin/Single/add',['id'=>$list.id])}" class="btn btn-default">修改</a>
                            <a href="{:url('admin/Single/delSingle',['id'=>$list.id])}" class="btn btn-default">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    {foreach name="flist" item="list" key="k"}
                    <tr>
                        <td><input type="checkbox"></td>
                        <td>{$list.title}</td>
                        <td>填空题</td>
                        <td>{$list.update_time}</td>
                        <td>
                            <a href="{:url('admin/Fillblank/preview',['id'=>$list.id])}" class="btn btn-default" target="_blank">预览</a>
                            <a href="{:url('admin/Fillblank/add',['id'=>$list.id])}" class="btn btn-default">修改</a>
                            <a href="{:url('admin/Fillblank/delFill',['id'=>$list.id])}" class="btn btn-default">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    {foreach name="jlist" item="list" key="k"}
                    <tr>
                        <td><input type="checkbox"></td>
                        <td>{$list.title}</td>
                        <td>判断题</td>
                        <td>{$list.update_time}</td>
                        <td>
                            <a href="{:url('admin/Judge/preview',['id'=>$list.id])}" class="btn btn-default" target="_blank">预览</a>
                            <a href="{:url('admin/Judge/add',['id'=>$list.id])}" class="btn btn-default">修改</a>
                            <a href="{:url('admin/Judge/delJudge',['id'=>$list.id])}" class="btn btn-default">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    {foreach name="slist" item="list" key="k"}
                    <tr>
                        <td><input type="checkbox"></td>
                        <td>{$list.title}</td>
                        <td>简答题</td>
                        <td>{$list.update_time}</td>
                        <td>
                            <a href="{:url('admin/Shortanswer/preview',['id'=>$list.id])}" class="btn btn-default" target="_blank">预览</a>
                            <a href="{:url('admin/Shortanswer/add',['id'=>$list.id])}" class="btn btn-default">修改</a>
                            <a href="{:url('admin/Shortanswer/delShort',['id'=>$list.id])}" class="btn btn-default">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
            <script>

            </script>
        </div>
    </div>



    <div class="frame_right col-xs-2 bl">
        <div class="row head">
            <div class="col-xs-12  ph10">
                <h4 class="m5">搜索试题</h4>
            </div>
        </div>

        <div class="row">
            <div class="search_list col-xs-12">
                <dl>
                    <dt><span class="sjb"></span>&nbsp;试题题干</dt>
                    <dd>
                        <div class="input-group input-group-sm">
                            <input type="text" class="form-control">
                                <span class="input-group-btn">
                                    <button class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
                                </span>
                        </div>
                    </dd>
                </dl>
                <dl>
                    <dt><span class="sjb"></span>&nbsp;试题类型</dt>
                    <dd>
                        <a href="#">单选题</a>
                        <a href="#">多选题</a>
                        <a href="#">不定项选择题</a>
                        <a href="#">填空题</a>
                        <a href="#">问答题</a>
                        <a href="#">材料题</a>
                        <a href="#">材料题</a>
                    </dd>
                </dl>
                <dl>
                    <dt><span class=""></span>&nbsp;试题类型</dt>
                    <dd class="dis_n">
                        <a href="#">单选题</a>
                        <a href="#">多选题</a>
                        <a href="#">不定项选择题</a>
                        <a href="#">填空题</a>
                        <a href="#">问答题</a>
                        <a href="#">材料题</a>
                        <a href="#">材料题</a>
                    </dd>
                </dl>
                <dl>
                    <dt><span class=""></span>&nbsp;试题类型</dt>
                    <dd class="dis_n">
                        <a href="#">单选题</a>
                        <a href="#">多选题</a>
                        <a href="#">不定项选择题</a>
                        <a href="#">填空题</a>
                        <a href="#">问答题</a>
                        <a href="#">材料题</a>
                        <a href="#">材料题</a>
                    </dd>
                </dl>
            </div>
        </div>

    </div>



</div>
</body>
<script>
    $(function () {
        $('.table-sort').dataTable({
            "aaSorting": [[1, "asc"]], //默认第几个排序
            "bStateSave": true, //状态保存
            "paging": true,//是否开启本地分页
            "searching": false,//是否开启本地搜索
            "ordering":  false,//关闭排序
            "aoColumnDefs": [
                {"orderable": false, "aTargets": [0]}// 制定列不参与排序
            ]
        });
    });
</script>
</html>